const Router = require('koa-router'); // 引入 koa-router
const router = new Router({ prefix: '/role' }); // 创建路由实例

const { getRoleList, saveRole, deleteRole } = require('@/controller/user/role'); // 引入控制器
const auth = require('@/middleware/auth');

router.post('/list', auth, getRoleList); // 获取角色列表
router.post('/save', auth, saveRole); // 保存角色
router.post('/delete',auth, deleteRole); // 删除角色

router.get('/', async (ctx, next) => {
  ctx.body = '角色列表';
});

module.exports = router;